package de.sendorian.app.forumArchive.repository;


import java.util.logging.Level;

import javax.persistence.NoResultException;

import de.sendorian.app.forumArchive.domain.User;

public class UserRepository extends RepositoryBase<User> {

	public UserRepository() {
		super(User.class);
	}

	public User findByName(String name) {
		try {
			return findByUniqueAttribute("name", name);
		} catch (NoResultException e) {
			logger.log(Level.FINEST, "No Forum found with name " + name);
		}
		return null;
	}
}
